VERSION 5.00
Object = "{C4847593-972C-11D0-9567-00A0C9273C2A}#8.0#0"; "crviewer.dll"
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "msdatgrd.ocx"
Object = "{B3FB64BF-91F9-11D7-A482-0008A14158BC}#2.22#0"; "ITGControls.ocx"
Begin VB.Form frmMaintProjectMaintenance 
   BorderStyle     =   3  'Fixed Dialog
   ClientHeight    =   7500
   ClientLeft      =   45
   ClientTop       =   45
   ClientWidth     =   8325
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   7500
   ScaleWidth      =   8325
   ShowInTaskbar   =   0   'False
   Begin MSComctlLib.StatusBar sbRS 
      Align           =   2  'Align Bottom
      Height          =   255
      Left            =   0
      TabIndex        =   0
      Top             =   7245
      Width           =   8325
      _ExtentX        =   14684
      _ExtentY        =   450
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   2
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Object.Width           =   3528
            MinWidth        =   3528
         EndProperty
         BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
         EndProperty
      EndProperty
   End
   Begin ITGControls.ITGTab SSTab2 
      Height          =   6135
      Left            =   0
      TabIndex        =   9
      Top             =   1080
      Width           =   8160
      _ExtentX        =   14393
      _ExtentY        =   10821
      TabCount        =   2
      TabCaption(0)   =   "               Main               "
      TabContCtrlCnt(0)=   2
      Tab(0)ContCtrlCap(1)=   "ComunionFrames1"
      Tab(0)ContCtrlCap(2)=   "ComunionFrames2"
      TabCaption(1)   =   "               List               "
      TabContCtrlCnt(1)=   1
      Tab(1)ContCtrlCap(1)=   "dtgList"
      TabTheme        =   2
      ActiveTabBackStartColor=   16250865
      ActiveTabBackEndColor=   16243138
      InActiveTabBackStartColor=   16243138
      InActiveTabBackEndColor=   16243138
      InActiveTabForeColor=   0
      BeginProperty ActiveTabFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty InActiveTabFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      OuterBorderColor=   4210752
      TopLeftInnerBorderColor=   4210752
      BottomRightInnerBorderColor=   4210752
      DisabledTabBackColor=   16243138
      DisabledTabForeColor=   -2147483630
      Begin ITGControls.ComunionFrames ComunionFrames1 
         Height          =   3045
         Left            =   60
         Top             =   360
         Width           =   7995
         _ExtentX        =   14102
         _ExtentY        =   5371
         FrameColor      =   4210752
         BackColor       =   16243138
         FillColor       =   16243138
         RoundedCorner   =   0   'False
         Caption         =   "Information"
         Alignment       =   0
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ThemeColor      =   5
         ColorFrom       =   16243138
         ColorTo         =   16250865
         Begin VB.CommandButton cmdPickCode2 
            Height          =   300
            Left            =   2880
            Picture         =   "frmMaintProjectMaintenance.frx":0000
            Style           =   1  'Graphical
            TabIndex        =   19
            Top             =   1740
            Width           =   315
         End
         Begin VB.CommandButton cmdPickCode 
            Height          =   300
            Left            =   2880
            Picture         =   "frmMaintProjectMaintenance.frx":014A
            Style           =   1  'Graphical
            TabIndex        =   18
            Top             =   1350
            Width           =   315
         End
         Begin VB.Timer Timer1 
            Interval        =   300
            Left            =   4680
            Top             =   360
         End
         Begin ITGControls.ITGTextBox txtProjectNo 
            Height          =   285
            Left            =   180
            TabIndex        =   1
            Top             =   615
            Width           =   3825
            _ExtentX        =   6535
            _ExtentY        =   503
            SendKeysTab     =   -1  'True
            BackColor       =   14745599
            LabelBackColor  =   16243138
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            AllCaps         =   -1  'True
            Mandatory       =   -1  'True
            Label           =   "Project ID"
            BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            LabelWidth      =   1400
            TextBoxWidth    =   2365
            Required        =   -1  'True
         End
         Begin ITGControls.ITGTextBox txtTotalAmount 
            Height          =   285
            Left            =   3240
            TabIndex        =   7
            Top             =   2175
            Width           =   3915
            _ExtentX        =   6694
            _ExtentY        =   503
            LabelBackColor  =   16243138
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Text            =   "0"
            DataType        =   1
            MaximumValue    =   9999999999.99
            DecimalPlace    =   2
            Label           =   "Total Project Amount"
            BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            LabelWidth      =   2000
            TextBoxWidth    =   1855
            Enabled         =   0   'False
         End
         Begin ITGControls.ITGTextBox txtCode 
            Height          =   285
            Left            =   180
            TabIndex        =   3
            Top             =   1365
            Width           =   2625
            _ExtentX        =   4419
            _ExtentY        =   503
            SendKeysTab     =   -1  'True
            BackColor       =   14745599
            LabelBackColor  =   16243138
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            AllCaps         =   -1  'True
            Mandatory       =   -1  'True
            Label           =   "Customer Name"
            BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            LabelWidth      =   1400
            TextBoxWidth    =   1165
            Required        =   -1  'True
         End
         Begin ITGControls.ITGTextBox txtName 
            Height          =   285
            Left            =   3225
            TabIndex        =   12
            Top             =   1365
            Width           =   4605
            _ExtentX        =   8017
            _ExtentY        =   503
            BackColor       =   14737632
            LabelBackColor  =   16243138
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            AllCaps         =   -1  'True
            Label           =   "ITGtext"
            BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            LabelWidth      =   0
            TextBoxWidth    =   4545
            Enabled         =   0   'False
         End
         Begin ITGControls.ITGDateBox dtbStartDate 
            Height          =   285
            Left            =   1600
            TabIndex        =   5
            Top             =   2160
            Width           =   1455
            _ExtentX        =   2566
            _ExtentY        =   503
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Text            =   ""
            SendKeysTab     =   -1  'True
         End
         Begin ITGControls.ITGTextBox txtPMCode 
            Height          =   285
            Left            =   180
            TabIndex        =   4
            Top             =   1755
            Width           =   2625
            _ExtentX        =   4419
            _ExtentY        =   503
            SendKeysTab     =   -1  'True
            BackColor       =   14745599
            LabelBackColor  =   16243138
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            AllCaps         =   -1  'True
            Mandatory       =   -1  'True
            Label           =   "Project Manager"
            BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            LabelWidth      =   1400
            TextBoxWidth    =   1165
            Required        =   -1  'True
         End
         Begin ITGControls.ITGTextBox txtPMName 
            Height          =   285
            Left            =   3225
            TabIndex        =   13
            Top             =   1755
            Width           =   4605
            _ExtentX        =   8017
            _ExtentY        =   503
            BackColor       =   14737632
            LabelBackColor  =   16243138
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            AllCaps         =   -1  'True
            Label           =   "ITGtext"
            BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            LabelWidth      =   0
            TextBoxWidth    =   4545
            Enabled         =   0   'False
         End
         Begin ITGControls.ITGTextBox txtProjectName 
            Height          =   285
            Left            =   180
            TabIndex        =   2
            Top             =   960
            Width           =   7635
            _ExtentX        =   13256
            _ExtentY        =   503
            SendKeysTab     =   -1  'True
            BackColor       =   14745599
            LabelBackColor  =   16243138
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            AllCaps         =   -1  'True
            Mandatory       =   -1  'True
            Label           =   "Project Name"
            BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            LabelWidth      =   1400
            TextBoxWidth    =   6175
            Required        =   -1  'True
         End
         Begin ITGControls.ITGDateBox dtbEndDate 
            Height          =   285
            Left            =   1600
            TabIndex        =   6
            Top             =   2520
            Width           =   1455
            _ExtentX        =   2566
            _ExtentY        =   503
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Text            =   ""
            SendKeysTab     =   -1  'True
         End
         Begin VB.Label Label2 
            AutoSize        =   -1  'True
            BackStyle       =   0  'Transparent
            Caption         =   "End Date"
            Height          =   195
            Left            =   180
            TabIndex        =   17
            Top             =   2520
            Width           =   675
         End
         Begin VB.Label Label1 
            AutoSize        =   -1  'True
            BackStyle       =   0  'Transparent
            Caption         =   "Start Date"
            Height          =   195
            Left            =   180
            TabIndex        =   14
            Top             =   2205
            Width           =   720
         End
      End
      Begin CRVIEWERLibCtl.CRViewer ITGReportViewer 
         Height          =   6200
         Left            =   -74940
         TabIndex        =   11
         Top             =   360
         Visible         =   0   'False
         Width           =   10500
         lastProp        =   500
         _cx             =   5080
         _cy             =   5080
         DisplayGroupTree=   0   'False
         DisplayToolbar  =   -1  'True
         EnableGroupTree =   0   'False
         EnableNavigationControls=   -1  'True
         EnableStopButton=   -1  'True
         EnablePrintButton=   -1  'True
         EnableZoomControl=   -1  'True
         EnableCloseButton=   -1  'True
         EnableProgressControl=   -1  'True
         EnableSearchControl=   -1  'True
         EnableRefreshButton=   0   'False
         EnableDrillDown =   -1  'True
         EnableAnimationControl=   -1  'True
         EnableSelectExpertButton=   0   'False
         EnableToolbar   =   -1  'True
         DisplayBorder   =   0   'False
         DisplayTabs     =   0   'False
         DisplayBackgroundEdge=   -1  'True
         SelectionFormula=   ""
         EnablePopupMenu =   -1  'True
         EnableExportButton=   -1  'True
         EnableSearchExpertButton=   0   'False
         EnableHelpButton=   0   'False
         LaunchHTTPHyperlinksInNewBrowser=   -1  'True
      End
      Begin MSDataGridLib.DataGrid dtgList 
         Height          =   5595
         Left            =   -74940
         TabIndex        =   10
         Top             =   360
         Width           =   7935
         _ExtentX        =   13996
         _ExtentY        =   9869
         _Version        =   393216
         AllowUpdate     =   0   'False
         AllowArrows     =   -1  'True
         Appearance      =   0
         HeadLines       =   1
         RowHeight       =   15
         TabAction       =   2
         FormatLocked    =   -1  'True
         BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ColumnCount     =   6
         BeginProperty Column00 
            DataField       =   "cProjectNo"
            Caption         =   "Project ID"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   1033
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column01 
            DataField       =   "cProjectName"
            Caption         =   "Project Name"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   1033
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column02 
            DataField       =   "cName"
            Caption         =   "Customer"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   1033
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column03 
            DataField       =   "nTotalAmount"
            Caption         =   "Amount"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   1
               Format          =   "0"
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   1033
               SubFormatType   =   1
            EndProperty
         EndProperty
         BeginProperty Column04 
            DataField       =   "dStartDate"
            Caption         =   "Start Date"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   1
               Format          =   "MM/dd/yyyy"
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   1033
               SubFormatType   =   3
            EndProperty
         EndProperty
         BeginProperty Column05 
            DataField       =   "dEndDate"
            Caption         =   "End Date"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   1
               Format          =   "MM/dd/yyyy"
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   1033
               SubFormatType   =   3
            EndProperty
         EndProperty
         SplitCount      =   1
         BeginProperty Split0 
            AllowRowSizing  =   0   'False
            BeginProperty Column00 
               ColumnWidth     =   1454.74
            EndProperty
            BeginProperty Column01 
               ColumnWidth     =   1980.284
            EndProperty
            BeginProperty Column02 
               ColumnWidth     =   1995.024
            EndProperty
            BeginProperty Column03 
               ColumnWidth     =   1470.047
            EndProperty
            BeginProperty Column04 
            EndProperty
            BeginProperty Column05 
            EndProperty
         EndProperty
      End
      Begin ITGControls.ComunionFrames ComunionFrames2 
         Height          =   2520
         Left            =   50
         Top             =   3480
         Width           =   7995
         _ExtentX        =   14102
         _ExtentY        =   4445
         FrameColor      =   4210752
         BackColor       =   16243138
         FillColor       =   16243138
         RoundedCorner   =   0   'False
         Caption         =   "Reference Transaction"
         Alignment       =   0
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ThemeColor      =   5
         ColorFrom       =   16243138
         ColorTo         =   16250865
         Begin VB.ComboBox cboType 
            Height          =   315
            ItemData        =   "frmMaintProjectMaintenance.frx":0294
            Left            =   1680
            List            =   "frmMaintProjectMaintenance.frx":0296
            Style           =   2  'Dropdown List
            TabIndex        =   20
            Top             =   1440
            Visible         =   0   'False
            Width           =   1005
         End
         Begin MSDataGridLib.DataGrid dtgRef 
            Height          =   1995
            Left            =   0
            TabIndex        =   8
            Top             =   480
            Width           =   6570
            _ExtentX        =   11589
            _ExtentY        =   3519
            _Version        =   393216
            AllowUpdate     =   -1  'True
            AllowArrows     =   -1  'True
            Appearance      =   0
            Enabled         =   -1  'True
            HeadLines       =   1
            RowHeight       =   15
            TabAction       =   2
            FormatLocked    =   -1  'True
            AllowDelete     =   -1  'True
            BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ColumnCount     =   4
            BeginProperty Column00 
               DataField       =   "cWorkID"
               Caption         =   "Work ID"
               BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
                  Type            =   0
                  Format          =   "0"
                  HaveTrueFalseNull=   0
                  FirstDayOfWeek  =   0
                  FirstWeekOfYear =   0
                  LCID            =   1033
                  SubFormatType   =   0
               EndProperty
            EndProperty
            BeginProperty Column01 
               DataField       =   "cDesc"
               Caption         =   "Description"
               BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
                  Type            =   0
                  Format          =   ""
                  HaveTrueFalseNull=   0
                  FirstDayOfWeek  =   0
                  FirstWeekOfYear =   0
                  LCID            =   1033
                  SubFormatType   =   0
               EndProperty
            EndProperty
            BeginProperty Column02 
               DataField       =   "nAmount"
               Caption         =   "Amount"
               BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
                  Type            =   1
                  Format          =   "0"
                  HaveTrueFalseNull=   0
                  FirstDayOfWeek  =   0
                  FirstWeekOfYear =   0
                  LCID            =   1033
                  SubFormatType   =   1
               EndProperty
            EndProperty
            BeginProperty Column03 
               DataField       =   "cStatus"
               Caption         =   "Status"
               BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
                  Type            =   0
                  Format          =   ""
                  HaveTrueFalseNull=   0
                  FirstDayOfWeek  =   0
                  FirstWeekOfYear =   0
                  LCID            =   1033
                  SubFormatType   =   0
               EndProperty
            EndProperty
            SplitCount      =   1
            BeginProperty Split0 
               AllowRowSizing  =   0   'False
               BeginProperty Column00 
                  Locked          =   -1  'True
               EndProperty
               BeginProperty Column01 
                  Locked          =   -1  'True
               EndProperty
               BeginProperty Column02 
                  ColumnWidth     =   1530.142
               EndProperty
               BeginProperty Column03 
                  Button          =   -1  'True
                  Locked          =   -1  'True
                  ColumnWidth     =   1679.811
               EndProperty
            EndProperty
         End
      End
   End
   Begin VB.Image imgLogo 
      BorderStyle     =   1  'Fixed Single
      Height          =   930
      Left            =   7110
      Stretch         =   -1  'True
      Top             =   0
      Width           =   1125
   End
   Begin VB.Shape Shape1 
      BorderColor     =   &H00404040&
      Height          =   975
      Left            =   45
      Top             =   0
      Width           =   6990
   End
   Begin VB.Label lblHeader 
      BackColor       =   &H00F7D9C2&
      Caption         =   "Project ID - Project Maintenance"
      BeginProperty Font 
         Name            =   "Tahoma"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00000000&
      Height          =   375
      Left            =   255
      TabIndex        =   16
      Top             =   195
      Width           =   6555
   End
   Begin VB.Label lblDetails 
      BackColor       =   &H00F7D9C2&
      Caption         =   "Project"
      ForeColor       =   &H00000000&
      Height          =   255
      Left            =   255
      TabIndex        =   15
      Top             =   555
      Visible         =   0   'False
      Width           =   6750
   End
End
Attribute VB_Name = "frmMaintProjectMaintenance"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'IT Group Inc. 2005.09.23

Option Explicit

'Object variables





'Recordset variables
Private WithEvents rsHeader As ADODB.Recordset
Attribute rsHeader.VB_VarHelpID = -1
Private rsDetail As ADODB.Recordset

'ADO Connection variables

Private connHeader As ADODB.Connection
Private connDetail As ADODB.Connection
'Form mode enumeration
Public Enum eProjectMaintenance
    Normal
    AddNewEdit
    Find
End Enum
Private Mode As eCreditCardMode

'Other declaration
Public dtgName As String
Public sBit As String
Private vBM As Variant 'Recordset bookmark variable
Public ParamType, lblType As String

'Security Acess Level variables
Public lACNew As Boolean
Public lACEdit As Boolean
Public lACDelete As Boolean
Public lACPost As Boolean
Public lACCancel As Boolean
Public lACPrint As Boolean


Private Sub cboType_Click()
    If dtgRef.Col = 0 Then
        rsDetail!cType = Trim(cboType)
    End If
End Sub

Private Sub cboType_LostFocus()
    cboType.Visible = False
    If Mode = AddNewEdit Then rsDetail!cStatus = Trim(cboType)
End Sub

Private Sub cboType_DropDown()
    cboType.Clear
    cboType.AddItem "ACTIVE"
    cboType.AddItem "CLOSE"
End Sub

Private Sub cboType_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = 13 Then
        If dtgRef.Col = 0 Then
            cboType_LostFocus
            dtgRef.Col = 1
            dtgRef.SetFocus
        End If
    ElseIf KeyCode = vbKeyEscape Then
        cboType.Visible = False
    End If
End Sub

Private Sub cmdPickCode_Click()
    If lPickListActive Then Exit Sub
    frmITGPicker.zType = QCustomer
    'Condition
    frmITGPicker.Condition = "where cCompanyID = '" & COID & "'"
    frmITGPicker.Show vbModal
    txtCode = frmITGPicker.zCode
    txtName = frmITGPicker.zName
    If Trim(txtName) <> "" Then
        SendKeys "{Tab}"
    End If
End Sub

Private Sub cmdPickCode2_Click()
    If lPickListActive Then Exit Sub
    frmITGPicker.zType = QEmployee
    'Condition
    frmITGPicker.Condition = "where cCompanyID = '" & COID & "'"
    frmITGPicker.Show vbModal
    txtPMCode = frmITGPicker.zCode
    txtPMName = frmITGPicker.zName
    If Trim(txtPMName) <> "" Then
        SendKeys "{Tab}"
    End If
End Sub

Private Sub dtgList_HeadClick(ByVal ColIndex As Integer)
    SortGrid dtgList, ColIndex, rsHeader
End Sub

Public Sub TBFindPrimary()
'    RSZero
'    Mode = Find
Dim sTemp As String
If Mode = Find Then
    FormWaitShow App.Path & "\Transmit.avi", "Loading data . . ."
            
    OpenNewConnection connHeader
    OpenNewConnection connDetail
    
    Set rsHeader = Nothing
    Set rsDetail = Nothing
    Set rsHeader = New ADODB.Recordset
    Set rsDetail = New ADODB.Recordset
            
    sTemp = Trim$(GetSearchString)
    If sTemp = "ERROR" Then
        MsgBox "Only Allows A - Z, 0 - 9, '.', ',' and %(wildcard)", vbExclamation, ""
        BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, lACNew, , , , , , , , , True, , , True
        txtCode.Locked = False
        txtCode.SetFocus
        Exit Sub
    End If
               
    OpenRecordsetWithCN rsHeader, "*", "Project_Maintenance", connHeader, IIf(sTemp = "", "", " WHERE " & sTemp)
    OpenRecordsetWithCN rsDetail, "*", "Project_Maintenance_T", connHeader, IIf(sTemp = "", "", " WHERE " & sTemp)
    
    Set FrmName = Me
    FormLocking True
            
     If rsHeader.RecordCount = 0 Then
        FormWaitHide
        MsgBox "No matching record/s found.", vbInformation, "ComUnion Search"
        BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, lACNew, , , , , , , , , True, , , True
        RSZero
        FormSearch True
'        GetChild
'        SetDataSource
'        SearchObj True
        Mode = Find
        Exit Sub
    End If
    GetChild
    SetDataSource
    SetDataField
    txtCode.BackColor = &HE0FFFF
    Mode = Normal
    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, lACNew, lACEdit, lACDelete, , , , , , , True, True, , True, True

    FormWaitHide
Else
    RSZero
    FormSearch True
'    SearchObj True
    Mode = Find
End If
    
End Sub

Private Function GetSearchString() As String
On Error GoTo ErrorHandler
Dim sWhere As String

    GetSearchString = True

    If Trim$(txtProjectNo.Text) <> "" Then
        sWhere = sWhere & IIf(Trim$(sWhere) = "", "", " AND ") & " cProjectNo LIKE '" & Trim$(txtProjectNo.Text) & "%'"
    End If

    If Trim$(txtCode.Text) <> "" Then
        sWhere = sWhere & IIf(Trim$(sWhere) = "", "", " AND ") & " cCode LIKE '" & Trim$(txtCode.Text) & "%'"
    End If
    
    If Trim$(txtPMCode.Text) <> "" Then
        sWhere = sWhere & IIf(Trim$(sWhere) = "", "", " AND ") & " cPMCode LIKE '" & Trim$(txtPMCode.Text) & "%'"
    End If

    GetSearchString = Trim$(sWhere)

    Exit Function
ErrorHandler:
    GetSearchString = "ERROR"
End Function

Private Sub RSZero()
    lblHeader = "Parameter Name"
    lblDetails = lblType
    sbRS.Panels(1) = "Record: 0/0"
    sbRS.Panels(2) = ""
    
    Set dtgRef.DataSource = Nothing
    dtgRef.Refresh
    
    Set FrmName = Me
    UnbindControls
    TextClearing
    FormLocking True
    
    If rsHeader.State = adStateOpen Then rsHeader.Close
    
    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, lACNew, , , , , , , , , True, , , True

    txtCode.Locked = False
    txtCode.SetFocus
    
    Mode = Find
End Sub

Private Sub dtgRef_AfterColEdit(ByVal ColIndex As Integer)
Select Case ColIndex
    Case 0
    Case 1
    Case 2
        TotalAmount
End Select

End Sub

Private Sub TotalAmount()
Dim nTotal As Double
Dim rsDummy As Recordset
nTotal = 0
Set rsDummy = rsDetail
rsDummy.MoveFirst
Do While rsDummy.EOF = False
    nTotal = nTotal + rsDummy!nAmount
    rsDummy.MoveNext
Loop
txtTotalAmount = nTotal
Set rsDummy = Nothing
End Sub

Private Sub dtgRef_ButtonClick(ByVal ColIndex As Integer)
    If Mode <> AddNewEdit Then Exit Sub
    Select Case ColIndex
        Case 0
            
        Case 3
            If rsDetail.RecordCount <> 0 Then
                Call MoveCombo(cboType, dtgRef, dtgRef.Columns(0))
                ComboLoadValue cboType, Trim(dtgRef.Columns(0).Text)
            End If
    End Select
End Sub

Private Sub Form_Load()
    Set FrmName = Me
    FormSetup
    
    Set rsHeader = New ADODB.Recordset
    Set rsDetail = New ADODB.Recordset
    
    AcessBit Me, GetValueFrTable("AccessLevel", "SEC_ACCESSLEVEL", "RoleID = '" & SecUserRole & "' AND [Module] = 'MF50'")
    
    FormLocking True
    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, lACNew, , , , , , , , , True, , , True
    BitVisible ITGLedgerMain.tbrMain
    ITGLedgerMain.tbrMain.Buttons("btnFind").ButtonMenus("btnFindP").Enabled = True
    
    FormLocking True
    FormSearch True
    SearchObj True
    
    Mode = Find
    txtCode.Locked = False
End Sub

Sub SearchObj(lEnable As Boolean)
    txtProjectNo.Enabled = lEnable
    txtTotalAmount.Enabled = lEnable
End Sub

Private Sub GetChild()
    rsDetail.Filter = "cProjectNo = '" & Trim(rsHeader!cProjectNo) & "'"
End Sub

Sub SetDataField()
    With rsHeader
'        txtcCompanyID.DataField = !cCompanyID
        txtProjectNo.DataField = !cProjectNo
        txtProjectName.DataField = !cProjectName
        txtCode.DataField = !cCode
        txtName.DataField = !cName
        txtPMCode.DataField = !cPMCode
        txtPMName.DataField = !cPMName
        dtbStartDate.DataField = !dStartDate
        dtbEndDate.DataField = !dEndDate
        txtTotalAmount.DataField = !nTotalAmount
    End With
End Sub

Sub SetDataSource()
'    Set FrmName = Me
'    BindControls rsHeader
'    Set dtgList.DataSource = rsHeader
    
    Set FrmName = Me
    BindControls rsHeader
    Set dtgList.DataSource = rsHeader
    Set dtgRef.DataSource = rsDetail
    
End Sub


'Add new record to the recordset
Public Sub TBNew()
    
    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, , , , True, True, , , True, True, , , , True
    txtProjectNo.BackColor = &HE0FFFF
    Mode = AddNewEdit
    
    If rsHeader.State <> adStateOpen Then
        OpenRecordset rsHeader, "*", "Project_Maintenance", "WHERE 1 = 0 ", True
        OpenRecordset rsDetail, "*", "Project_Maintenance_T", "WHERE 1 = 0 ", True
        SetDataSource
        SetDataField
        
    Else
        vBM = rsHeader.Bookmark
        
    End If
    
    rsHeader.AddNew
    rsDetail.Filter = "cProjectNo = '" & Trim(rsHeader!cProjectNo) & "'"
    
    rsHeader!cCompanyID = COID
    
    Set FrmName = Me
    FormLocking False
    txtProjectNo.SetFocus
    SSTab2.ActiveTab = 0
    txtProjectNo.SetFocus

End Sub

Public Sub TBUndoAll()
On Error GoTo ErrorHandler
    
    Mode = Normal

    If rsHeader.Status = adRecNew Then TBUndoCurrent
    
    rsHeader.CancelBatch adAffectAll
    rsDetail.CancelBatch adAffectAll
    
    UnbindControls
    
    If rsHeader.RecordCount <> 0 Then rsHeader.Bookmark = vBM
    
    Set FrmName = Me
    FormLocking True
    
    If rsHeader.RecordCount <> 0 Then
        BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, lACNew, lACEdit, lACDelete, , , , , , , True, True, , True
    Else
        RSZero
        Mode = Find
    End If
    
    rsDetail.Filter = "cProjectNo = '" & Trim(rsHeader!cProjectNo) & "'"
    
    sbRS.Panels(2) = ""
    
    SetDataSource
    SetDataField

ErrorHandler:
    If err.Number = -2147217885 Then
        Resume Next
    ElseIf err.Number = -2147217842 Then 'Operation was cancelled. (Error returned by ITGDateBox)
        TBUndoAll
    End If

End Sub

'Undo changes on the current record
Public Sub TBUndoCurrent()
On Error GoTo ErrorHandler

    If rsHeader.Status = adRecNew Then
        rsHeader.CancelUpdate
    Else
        rsHeader.CancelBatch adAffectCurrent
    End If
   
    If rsHeader.RecordCount = 0 Then RSZero
    
ErrorHandler:
    If err.Number = -2147217885 Then
        Resume Next
    ElseIf err.Number = -2147217842 Then 'Operation was cancelled. (Error returned by ITGDateBox)
        TBUndoCurrent
    End If

End Sub

Public Sub TBSave()
Dim OKUpdate As Boolean
On Error GoTo ErrHandler
    
    'Audit Trail
    lBoolean = False
    If rsHeader.Status = adRecNew Then lBoolean = True
    
    If Not MandatoryOK Then Exit Sub
    
    OKUpdate = False
    cn.BeginTrans
    
    rsHeader.UpdateBatch adAffectAll
    rsDetail.UpdateBatch adAffectAll
    
    cn.CommitTrans
    OKUpdate = True
    
    Set FrmName = Me
    FormLocking True
    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, lACNew, lACEdit, lACDelete, , , , , , , True, True, , True
    Mode = Normal
    
    MsgBox "Record/s successfully saved.", vbInformation, "ComUnion"
    sbRS.Panels(2) = ""

    'Audit trail
    UpdateLogFile "Sec - Module", Trim(txtProjectNo), IIf(lBoolean, "Inserted", "Updated")

ErrHandler:
    If err.Number = -2147217885 Then
        Resume Next
    ElseIf err.Number = -2147217864 Then
        OKUpdate = True
        cn.RollbackTrans
        MsgBox "Record cannot be updated. Some values may have been changed by other user/s since last read." & vbCr & _
                "Records will be automatically refreshed. All changes made to the record will be gone upon refresh.", vbInformation, "ComUnion"
        vBookMark = rsHeader.Bookmark
        UnbindControls
        rsHeader.Requery
        BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, lACNew, lACEdit, lACDelete, , , , , , , True, True, , True
        Mode = Normal
        If rsHeader.RecordCount <> 0 Then
            Set FrmName = Me
            FormLocking True
            SetDataField
            SetDataSource
            rsHeader.Bookmark = vBookMark
        Else
            RSZero
        End If
    End If
    
    If Not OKUpdate Then
        MsgBox "Transaction update failed.", vbInformation, "ComUnion"
        cn.RollbackTrans
        ErrorLog err.Number, err.Description, Me.Name 'Error log
    End If
    
End Sub


'Check if all mandatory fields are complete
Function MandatoryOK() As Boolean
    
    MandatoryOK = True
    
    If Trim(txtProjectNo) = "" Then
        MandatoryOK = False
        MsgBox "Field 'Module ID' is mandatory. Null value is not allowed.", vbInformation, "ComUnion"
        txtProjectNo.SetFocus
        Exit Function
    End If
    
    If rsHeader.Status = adRecNew Then
        If IDExisting(rsHeader, "[cProjectNo]", "Project_Maintenance", Trim(rsHeader![cProjectNo]), , True) Then
            MandatoryOK = False
            MsgBox "Module ID already exists.", vbInformation, "ComUnion"
            txtProjectNo.SetFocus
            Exit Function
        End If
    End If
    
    If Trim(txtProjectName) = "" Then
        MandatoryOK = False
        MsgBox "Field 'Description' is mandatory. Null value is not allowed", vbInformation, "ComUnion"
        txtProjectName.SetFocus
        Exit Function
    End If

End Function

'Add new line to the detail recordset
Public Sub TBNewLine()
If dtgName = "dtgRef" Then
    If lPickListActive Then Exit Sub
'    sFilterString = Trim(rsDetail!WorkID)
    frmITGPicker.zType = QWork
    frmITGPicker.Condition = "where cCompanyID = '" & COID & "'"
    
    frmITGPicker.Show vbModal
    
    If frmITGPicker.zCode = Null Or frmITGPicker.zCode = "" Then: Exit Sub
    rsDetail.AddNew
    rsDetail!cCompanyID = COID
    rsDetail!cProjectNo = Trim(rsHeader!cProjectNo)
    rsDetail!cWorkID = frmITGPicker.zCode
    rsDetail!cDesc = frmITGPicker.zName
    rsDetail!nAmount = 0
    rsDetail!cStatus = ""
End If
If rsDetail.RecordCount <> 0 Then rsDetail.MoveLast
dtgRef.SetFocus
dtgRef.Refresh
GetChild
'BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, , , , True, True, , , True, True, , , , True

End Sub

Private Sub dtgRef_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Mode <> AddNewEdit Then Exit Sub
    If Button = 2 Then
        dtgName = dtgRef.Name
        PopupMenu ITGLedgerMain.mnuDetail
    End If
End Sub

Public Sub TBDeleteLine()
On Error GoTo ErrorHandler
    If dtgName = dtgRef.Name Then
        If rsDetail.RecordCount = 0 Then Exit Sub
        vBookMark = dtgRef.Bookmark
        GetChild
        dtgRef.Bookmark = vBookMark
        rsDetail.Delete adAffectCurrent
        TotalAmount
    End If
    GetChild

    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, , , , True, True, , , True, True, , , , True

ErrorHandler:
    If err.Number = -2147217885 Then
        Resume Next
    End If
End Sub


Public Sub TBNextRec()
    If rsHeader.State <> adStateOpen Then Exit Sub
    MoveNext rsHeader
    rsDetail.Filter = "cProjectNo = '" & Trim(rsHeader!cProjectNo) & "'"
End Sub

Public Sub TBLastRec()
    If rsHeader.State <> adStateOpen Then Exit Sub
    MoveLast rsHeader
    rsDetail.Filter = "cProjectNo = '" & Trim(rsHeader!cProjectNo) & "'"
End Sub

Public Sub TBFirstRec()
    If rsHeader.State <> adStateOpen Then Exit Sub
    MoveFirst rsHeader
    rsDetail.Filter = "cProjectNo = '" & Trim(rsHeader!cProjectNo) & "'"
End Sub

Public Sub TBPrevRec()
    If rsHeader.State <> adStateOpen Then Exit Sub
    MovePrevious rsHeader
    rsDetail.Filter = "cProjectNo = '" & Trim(rsHeader!cProjectNo) & "'"
End Sub

Public Sub TBEdit()
    If rsHeader!lCancelled = True Then
        MsgBox "Transaction was already cancelled. Edit is not allowed.", vbExclamation, msgTtl
        Exit Sub
    End If
    If rsHeader!lApproved = True Then
        MsgBox "Transaction was already approved. Edit is not allowed.", vbExclamation, "ComUnion"
        Exit Sub
    End If
    
    Mode = AddNewEdit
    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, , , , True, True, , , True, True, , , , True
    Set FrmName = Me
    FormLocking False
    ClrRequired &HC0&
    txtProjectNo.Locked = True
    SSTab2.ActiveTab = 0
    txtProjectName.SetFocus
    vBM = rsHeader.Bookmark
End Sub


Public Sub TBDelete()
On Error GoTo ErrorHandler

    If rsHeader.RecordCount = 0 Then Exit Sub
    If rsHeader!lApproved = True Then
        MsgBox "Transaction was already Approved. Delete is not allowed.", vbExclamation, msgTtl
        Exit Sub
    End If
    
    If rsHeader!lCancelled = True Then
        MsgBox "Transaction was already cancelled. Delete is not allowed.", vbExclamation, msgTtl
        Exit Sub
    End If

    If MsgBox("Are you sure you want to delete this record?", vbQuestion + vbYesNo, msgTtl) = vbNo Then Exit Sub
    UpdateGLA "Delete", "PAY", Trim(txtProjectNo)
    
    UpdateLogFile "Payables", Trim(txtProjectNo), "Deleted"
    
    GetChild
    If rsDetail.RecordCount <> 0 Then
        rsDetail.MoveFirst
        Do Until rsDetail.RecordCount = 0
            rsDetail.Delete adAffectCurrent
            If rsDetail.RecordCount <> 0 Then rsDetail.MoveFirst
        Loop
    End If
    
    rsHeader.Delete adAffectCurrent
    rsDetail.UpdateBatch adAffectAll
    rsHeader.UpdateBatch adAffectAll
    
    TBPrevRec
    Mode = Normal
    If rsHeader.RecordCount = 0 Then
        RSZero
    End If
ErrorHandler:
    If err.Number = -2147217885 Then
        Resume Next
    ElseIf err.Number = -2147217864 Then
        cn.Execute "DELETE PAYABLES_ACCOUNT WHERE cTranNo = '" & sID & "' AND cCompanyID = '" & COID & "'"
        cn.Execute "DELETE PAYABLES WHERE cTranNo = '" & sID & "' AND cCompanyID = '" & COID & "'"
        Resume Next
        
        ElseIf err.Number = -2147217887 Then
        Resume Next
        
    End If
End Sub
